﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using PlanningGIS.DataConvert.form;
using System.IO;
using System.Drawing;
using ESRI.ArcGIS.Controls;
using ESRI.ArcGIS.Carto;
using ESRI.ArcGIS.Geodatabase;
using ESRI.ArcGIS.ADF.BaseClasses;
using PlanningGIS.Framework;

namespace PlanningGIS.DataConvert.button
{
    /// <summary>
    /// 名    称：btnDemConvert
    /// 作    用：.dem文件数据转换为栅格格式菜单
    /// 开发人员：张利勇
    /// 开发日期：2009-05-13
    /// 修改人员：张利勇
    /// 修改日期：
    /// 修改说明：处理的栅格数据提示是否加载到地图控件上
    /// </summary>
    public class btnDemConvert : BaseCommand
    {
        IApplication m_Application = null;
        public btnDemConvert()
        {
            base.m_caption = "栅格格式转换";
            base.m_toolTip = base.m_caption;
        }

        public override void OnCreate(object hook)
        {
            m_Application = hook as IApplication;
        }

        public override bool Enabled
        {
            get
            {
                return true;
            }
        }

        /*
        public override int Bitmap
        {
            get
            {
                string bitmapResourceName = "PlanningGIS.DataConvert.Res." + this.GetType().Name + ".png";
                return new Bitmap(GetType().Assembly.GetManifestResourceStream(bitmapResourceName)).GetHbitmap().ToInt32();
            }
        }*/

        public override void OnClick()
        {
            base.OnClick();
            frmConvertDemBatch frmDemConvert = new frmConvertDemBatch();
            frmDemConvert.Show((m_Application as IFramework).MdiForm);
        }
    }
}
